
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="../static/layui-v2.9.1/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../static/css/public.css" media="all">
    <style>
        body {
            background-color: #ffffff;
        }
    </style>
</head>
<body>
<div class="layui-form layuimini-form">

    <input type="hidden" id="id" name="id" value="">
    <div class="layui-form-item">
        <div class="layui-row">
            <div class="layui-col-md3">
                <label class="layui-form-label required">流水号</label>
            </div>
            <div class="layui-col-md9">
                <div class="layui-input-block">
                    <input type="text" id="idNumber" name="idNumber"
                           placeholder="请输入流水号" value="" class="layui-input" readonly>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-row">
            <div class="layui-col-md3">
                <label class="layui-form-label required">银行卡号</label>
            </div>
            <div class="layui-col-md3">
                <div class="layui-input-block">
                    <input type="text" id="cardId" name="cardId"
                           placeholder="请输入银行卡号" value="" class="layui-input" readonly>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-row">
            <div class="layui-col-md3">
                <label class="layui-form-label required">转账类型</label>
            </div>
            <div class="layui-col-md9">
                <div class="layui-input-block">
                    <input type="text" id="transType" name="transType"
                           placeholder="请输入转账类型" value="" class="layui-input" readonly>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-row">
            <div class="layui-col-md3">
                <label class="layui-form-label required">交易类型</label>
            </div>
            <div class="layui-col-md9">
                <div class="layui-input-block">
                    <input type="text" id="payType" name="payType"
                           placeholder="请输入交易类型" value="" class="layui-input" readonly>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-row">
            <div class="layui-col-md3">
                <label class="layui-form-label required">接收方账户</label>
            </div>
            <div class="layui-col-md9">
                <div class="layui-input-block">
                    <input type="text" id="recardId" name="recardId"
                           placeholder="请输入接受方账户" value="" class="layui-input" readonly>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-row">
            <div class="layui-col-md3">
                <label class="layui-form-label required">所属用户</label>
            </div>
            <div class="layui-col-md9">
                <div class="layui-input-block">
                    <input type="text" id="userId" name="userId"
                           placeholder="请输入所属Id" value="" class="layui-input" readonly>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-row">
            <div class="layui-col-md3">
                <label class="layui-form-label required">交易日期</label>
            </div>
            <div class="layui-col-md9">
                <div class="layui-input-block">
                    <input type="text" id="payDate" name="payDate"
                            value="" class="layui-input" readonly>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-row">
            <div class="layui-col-md3">
                <label class="layui-form-label required">交易金额</label>
            </div>
            <div class="layui-col-md9">
                <div class="layui-input-block">
                    <input type="text" id="money" name="money"
                           placeholder="请输入金额" value="" class="layui-input" readonly>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
        </div>
    </div>
</div>
<script src="../static/layui-v2.9.1/layui/layui.js" charset="utf-8"></script>
<script>
    layui.use(['form'], function () {
        var form = layui.form;
        var layer = layui.layer;
        var $ = layui.$;

        //监听提交
        form.on('submit(saveBtn)', function (data) {
            console.log("data--->>>", data);
            var jsData = data.field;
            $.ajax({
                url: "/paymentMessageUpdate",
                type: "post",
                data: jsData,
                success: function (result) {
                    if (result.code == 0) {
                        layer.alert("更新成功", {icon: 6}, function () {
                            //关闭当前frame
                            var index = parent.layer.getFrameIndex(window.name);
                            parent.layer.close(index);
                            // 可以对父窗口进行刷新
                            parent.location.reload();
                        });
                    } else {
                        layer.msg("更新失败")
                    }
                }
            })

            return false;
        });
    });
</script>
</body>
</html>
